Repository navigation
Let the phones sign in: a code may go to the app's own scheme - #49
Merged
Merged
Conversation
The desktop app gets its code on a loopback port. The phones cannot listen on one while the browser sheet (iOS) or Custom Tab (Android) is open, so they come back to the app's own scheme instead (RFC 8252, 7.1). The server now takes exactly com.hivepaas.shellwing://server besides a loopback port. Another app that claimed the scheme could catch a code, but not use it without the verifier, which stays on the phone. The approval page shows a phone for ios and android. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shellwing app's phones can now sign in to a server. The desktop app gets its code on a loopback port (
http://127.0.0.1:<port>/callback). A phone cannot listen on a port while its browser sheet (iOS) or Custom Tab (Android) is open, so the browser goes back to the app's own scheme instead (RFC 8252, 7.1).What changes
validDeviceRedirectaccepts exactlycom.hivepaas.shellwing://server, as well as a literal loopback address./connect-device/) shows a phone icon when the platform isiosorandroid.Tests
go test ./usecase/sessionuc/covers the redirect cases.tsc,eslintandprettierpass on the page.a_phone_signs_in_through_the_apps_schemetest ran against this branch's server on a fresh database. It checks that a phone signs in through the scheme, reads and writes, and is listed with platformios. After signing out, its token stops working. A redirect to a web address is answered 400.The app's side is a separate PR in
hivepaas/shellwing. This PR has to be deployed before the phones can sign in to a real server.Unrelated: the app's older e2e test,
two_devices_share_a_vault_and_one_is_given_a_certificate, now fails against main withERR_SSH_SELF_GRANT. The admin grants itself an account, which the server now refuses.🤖 Generated with Claude Code